package com.rlz.framemm.proxy;

import android.util.Log;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

/**
 * Created by RLZ
 * on 2021/10/14
 */
public class RealHandler implements InvocationHandler {
    private final Object mObj;

    public RealHandler(Object obj) {
        mObj = obj;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws InvocationTargetException, IllegalAccessException {
        Log.e("proxy", "学习会技能-浩然正气");
        Object invoke = method.invoke(mObj, args);
        Log.e("proxy", "学习会技能-隔山打牛");
        return invoke;
    }
}
